package com.atlin.project.service;

import com.atlin.project.model.domain.QuotationData;
import com.atlin.project.model.domain.QuotationStatistics;
import com.atlin.project.model.dto.quotationData.QuotationDataCaptureRequest;
import com.atlin.project.model.dto.quotationData.QuotationDataQueryRequest;
import com.atlin.project.model.dto.quotationData.QuotationDataRecommendQuery;
import com.atlin.project.model.dto.quotationData.QuotationStatisticsQuery;
import com.atlin.project.model.vo.QuotationDataRecommendVO;
import com.atlin.project.model.vo.QuotationDataVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author atlin
 * @description 针对表【quotation_data(语录数据表)】的数据库操作Service
 * @createDate 2024-07-11 09:26:50
 */
public interface QuotationDataService extends IService<QuotationData> {

    void validQuotationData(QuotationData quotationData, boolean add);

    /**
     * 获取封装
     *
     * @param quotationData
     * @param request
     * @return
     */
    QuotationDataVO getQuotationDataVO(QuotationData quotationData, HttpServletRequest request);


    /**
     * 获取查询条件
     *
     * @param questionQueryRequest
     * @return
     */
    QueryWrapper<QuotationData> getQueryWrapper(QuotationDataQueryRequest questionQueryRequest);

    /**
     * 分页获取封装
     *
     * @param questionPage
     * @param request
     * @return
     */
    Page<QuotationDataVO> getQuotationDataVOPage(Page<QuotationData> questionPage, HttpServletRequest request);

    /**
     * 抓取语录数据
     *
     */
    void captureQuoteData();

    void captureQuoteData(QuotationDataCaptureRequest quotationDataCaptureRequest);
    
    /**
     * 语录推荐
     *
     * @param quotationDataRecommendQuery 推荐查询参数
     * @return 语录
     */
    QuotationDataRecommendVO quotationRecommend(QuotationDataRecommendQuery quotationDataRecommendQuery, HttpServletRequest request);

    QuotationStatistics getQuotationStatistics(QuotationStatisticsQuery quotationDataRecommendQuery);

    List<QuotationDataVO> getFromAddrDetail(List<String> fromAddrList);

    List<QuotationDataVO> getFromWhoDetail(List<String> fromWhoList);
}
